﻿#ifndef COMMANDBOX_H
#define COMMANDBOX_H

#include <QDialog>
#include <QString>
#include <QUrl>
#include <QDesktopServices>
#define SEARCH "http://www.baidu.com/s?wd="

enum Command{
    torus_test,
    pop_test,
    bell_test,
    cmd_search,
    re_props,
    re_cmd,
    re_location,
    re_tool,
    re_group
};

namespace Ui {
class CommandBox;
}

class CommandBox : public QDialog
{
    Q_OBJECT

public:
    explicit CommandBox(QWidget *parent = 0);
    ~CommandBox();

    Command cmdAnalyze(const QString &);

signals:
    void sendCmd(const Command &);

private slots:
    void on_btn_go_clicked();

private:
    Ui::CommandBox *ui;
    QString cmdStr;
    QString searchStr;
};

#endif // COMMANDBOX_H
